package com.yxq.mdt.app.modules.socialcontact.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yxq.mdt.app.R;
import com.yxq.mdt.app.glide.GlideHelper;
import com.yxq.mdt.app.modules.socialcontact.bean.MainSocialTopBean;

import java.util.List;

public class MainSocialTopAdapter extends BaseQuickAdapter<MainSocialTopBean.ListBean, BaseViewHolder> {
    public MainSocialTopAdapter(int layoutResId, @Nullable List<MainSocialTopBean.ListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MainSocialTopBean.ListBean item) {
        GlideHelper.setLoadCirlcleImage(mContext, item.getHeadimg(), R.mipmap.head_icon, helper.getView(R.id.community_top_img));
        helper.setText(R.id.community_nike_name, item.getGsName());
        helper.setText(R.id.community_city, item.getResidence());
        helper.setText(R.id.community_intro, item.getGeneration());
        helper.addOnClickListener(R.id.community_relation);
    }

    @Override
    public int getItemCount() {
        return super.getItemCount();
    }
}
